import React from 'react';
import { Box, Button, Tooltip } from '@mui/material';
import { Add as AddIcon, ViewInAr as ViewInArIcon, Archive as ArchiveIcon } from '@mui/icons-material';
import NavigationService from './NavigationService';

const MainMenu = () => {
    const handleCreateModelClick = () => {
        // 直接创建新模型
        NavigationService.goToCreateModel();
    };

    const handleModelLibraryClick = () => {
        // 导航到模型库
        NavigationService.goToModelLibrary();
    };

    const handleMaterialLibraryClick = () => {
        // 导航到材料库
        NavigationService.goToMaterialLibrary();
    };

    return (
        <Box sx={{ display: 'flex', gap: 1 }}>
            <Tooltip title="创建模型">
                <Button
                    variant="contained"
                    color="primary"
                    startIcon={<AddIcon />}
                    onClick={handleCreateModelClick}
                >
                    创建模型
                </Button>
            </Tooltip>

            <Tooltip title="模型库">
                <Button
                    variant="outlined"
                    color="primary"
                    startIcon={<ViewInArIcon />}
                    onClick={handleModelLibraryClick}
                >
                    模型库
                </Button>
            </Tooltip>

            <Tooltip title="材料库">
                <Button
                    variant="outlined"
                    color="secondary"
                    startIcon={<ArchiveIcon />}
                    onClick={handleMaterialLibraryClick}
                >
                    材料库
                </Button>
            </Tooltip>
        </Box>
    );
};

export default MainMenu; 